package com.casic.ops.entity.dto.pipeline;

import com.casic.ops.consts.user.UserHolder;
import com.casic.ops.utils.OpsSnowFlake;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 流水线节点配置信息DTO
 * @author cww
 * @date 2022/6/17
 */
@Data
@Accessors(chain = true)
public class PipelineNodeInfoDTO extends CommonDTO{
    /**
     * 唯一标示做关联
     */
    @NotNull
    private String nodeUuid;
    /**
     * 节点中文名称
     */
    private String nodeName;
    /**
     * 节点详细内容
     */
    private String info;

    public void init(){
        this.setCreator(UserHolder.get().getUsername());
        this.setModifier(UserHolder.get().getUsername());
        Date date = new Date();
        this.setGmtCreate(date);
        this.setGmtModified(date);
    }
}
